<?php $msgs = Yii::app()->user->getFlash('msgs'); ?>
         <!-- START OF MAINCOL -->
          <div class="MainCol AM_BookPage">

              <h1 class="left">用户管理</h1>

              <br class="clear" />

              <span class="NormalFont SmallFont">
                  <a href="<?php echo Yii::app()->baseUrl; ?>" title="home"><?= CHtml::image(Yii::app()->baseUrl.'/images/home_icon.gif', '主页'); ?></a> > 用户管理 > 用户管理列表
               </span><br /><br />

              <div class="Titlebox box"><!-- DON'T DELETE --></div>

              <!--<div class="SuccessfulBox Smallbox">
                <span class="Successful"> <?php echo $msgs['save']; ?> </span>
              </div>
              
              -->

              <?php if(Yii::app()->user->hasFlash('message')) : ?>
              <div class="SuccessfulBox Smallbox">
                <span class="Successful"> <?php echo Yii::app()->user->getFlash('message'); ?></span>
              </div>
              <?php endif; ?>

              <div class="DisplayBox_top Smallbox">

              	  <b class="left SmallFont">共 <span class="Blue"><?php echo $count; ?></span> 条记录</b>

                  <?php $this->widget('CLinkPager', array('pages' => $pages)); ?>

                  <br class="clear" />
              </div>

              <ul class="Lists Smallbox">
              <?php foreach($users as $k => $user) { ?>
              	  <li <?php if($k%2 == 1) { ?>class="ThinGrey_bg"<?php } ?>>

                      <span class="ContentBox">
                          <p class="Smallbox">
	                          	<b><?php echo $user->userEmail; ?>，<?php echo $user->userNickname; ?>，<?php echo $user->userTruename; ?></b>
                          </p>

                          <p class="Smallbox">
                              <label>账号状态</label>: <span class="<?php if($user->userStatus == Users::STATUS_ENABLE) : ?>Successful<?php elseif($user->userStatus == Users::STATUS_DISABLE) : ?>Enable<?php endif; ?>"><a href="<?php echo CHtml::normalizeUrl(array('/admin/users/togglestatus', 'id' => $user->userId)) ?>"><?php echo $user->status(); ?></a></span><br />
                          <label>注册时间</label>: <?php echo date(Yii::app()->params->dateFormat, $user->userRegistered); ?><br />
                          <label>用户角色</label>: <a href="<?php echo CHtml::normalizeUrl(array('/admin/users/togglerole', 'id' => $user->userId)) ?>"><?php echo $user->getRoleName(); ?></a><br />
                          </p>
                      </span>
                      <br class="clear" />

                      <span class="Rated">&nbsp;</span>
                </li>
                <?php } ?>

              </ul>


              <div class="DisplayBox_btm">

              	  <b class="left SmallFont">共 <span class="Blue"><?php echo $count; ?></span> 条记录。</b>

                  <?php $this->widget('CLinkPager', array('pages' => $pages)); ?>

                  <br class="clear" />
              </div>

        </div>
          <!-- END OF MAINCOL -->